package com.wyw.hemerocallis.filter.factory;

import com.wyw.hemerocallis.filter.HeaderTokerGatewayFilter;
import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
import org.springframework.stereotype.Component;

/**
 * 局部过滤器的工厂
 *  局部过滤器生效的步骤
 *      1、实现gatewayFilter
 *      2、加入过滤器工厂
 *      3、配置文件中配置，要不然还是没有生效
 *
 * @author Mr Wu    yewen.wu.china@gmail.com
 * <p>
 * Update History:
 * Author        Time            Content
 */
@Component
public class HeaderTokenAbstractGatewayFilterFactory extends AbstractGatewayFilterFactory<Object> {
    @Override
    public GatewayFilter apply(Object config) {
        return new HeaderTokerGatewayFilter();
    }
}
